package remote.activities;

import remote.adapters.ImageViewAdapter;
import remote.constants.IAction;
import remote.controllers.ActionBarController;
import remote.controllers.WMPController;
import remote.activities.R;
import android.app.Activity;
import android.os.Bundle;
import android.widget.GridView;
import android.widget.ImageView;

public class MediaControllerActivity extends Activity
{
	private ActionBarController _actionBarController;
	private WMPController _wmpController;
	
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.media_controller);
		
		_actionBarController = new ActionBarController(this);
		_wmpController = new WMPController(this);
		
		GridView gridView = (GridView)findViewById(R.id.media_controller_gridView);
		gridView.setAdapter(new ImageViewAdapter(this, _wmpController));
		
		ImageView imgHome = (ImageView)findViewById(R.id.media_controller_imgHome);
		imgHome.setId(IAction.GO_HOME);
		imgHome.setOnClickListener(_actionBarController);
		
		ImageView imgFolder = (ImageView)findViewById(R.id.media_controller_imgFolder);
		imgFolder.setOnClickListener(_wmpController);
	}
}
